<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>滴滴打车游戏</title>
	<style>
	*{
		padding: 0;
		margin: 0;
	}
	html{
		font-size: 20px;
		height: 100%;
	}
	body{
		height: 100%;
	}
	
	#box{
	
		position: relative;
		width: 100%;
		height: 100%;
		background: url(img/yellow.png);
		background-size: 100% 100%;
	}
    #pic{
    	width: 5rem;
    	height: 6rem;
    	top: 50%;
    	left: 60%;
    	position: absolute;

    }
	</style>

</head>
<script>
	(function (doc, win) {
            var docEl = doc.documentElement,
                    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                    recalc = function () {
                        window.clientWidth = docEl.clientWidth;
                        if (!window.clientWidth) return;
                        docEl.style.fontSize = 20 * (window.clientWidth / 640) + 'px';
                        window.base = 20 * (window.clientWidth / 640);
                    };

            try {
                recalc();
            } catch (e) {

            }
            if (!doc.addEventListener) return;
            win.addEventListener(resizeEvt, recalc, false);
            doc.addEventListener('DOMContentLoaded', recalc, false);
        })(document, window);
        window.canvasWidth = document.documentElement.clientWidth;
        window.canvasHeight = document.documentElement.clientHeight;
	</script>
<body>
	<div id="box">
		<img id="pic" src="img/car1.png" alt="">
	</div>
</body>
<script>
	var box=document.getElementById('box');
	var pic=document.getElementById('pic');

	var timer=null;
	var picoff=pic.offsetLeft;
	timer=setInterval(function(){
		picoff-=100;
		pic.style.left=picoff + 'px';
		if(picoff <= 0){
			clearInterval(timer);
			// timer=null;
			window.open("dididacheyouxi2.html","_self");
		}
	},1000)
</script>
</html>








